<?php

namespace App\Containers\AppSection\Confirmation\Actions;

use App\Containers\AppSection\Confirmation\Tasks\GetConfirmationsTask;
use App\Ship\Parents\Actions\Action;
use App\Ship\Parents\Requests\Request;

class GetAdminConfirmationsAction extends Action
{
    public function run(Request $request)
    {
        return app(GetConfirmationsTask::class)
            ->addRequestCriteria()
            ->addOrderByCriteria()
            ->forType($request->getInputByKey('type') . '_confirm')
            ->run();
    }
}
